/*
 * Copyright: Copyright (c) 2014-2015 ZhongDaMen,Inc.All Rights Reserved. 
 * Company:中大门网络科技有限公司
 */

package com.sc.util.exception;

/**
 * <h1>异常代码枚举类</h1>
 * @ClassName: ExceptionEnum
 * @Description: 异常代码枚举类
 * @author SC-ZZW
 * @date Aug 17, 2015 3:28:46 PM
 *
 */
public enum ExceptionEnum{
	//操作数据
	/** 数据操作成功 */
	DATA_SUCCESS("SC100","数据操作成功",true),
	/** 数据保存出错 */
	DATA_INSERT("SC101","数据保存出错！",false),
	/** 数据删除出错 */
	DATA_DELETE("SC102","数据删除出错！",false),
	/** 数据修改出错 */
	DATA_UPDATE("SC103","数据修改出错！",false),
	/** 数据查询出错 */
	DATA_SELECT("SC104","数据查询出错！",false),
	/** 参数传递出错 */
	DATA_PARAM("SC105","参数传递出错！",false),
	/** 参数传递出错 */
	DATA_FAIL("SC106","数据操作失败！",false),
	/** 数据保存出错 */
	DATA_SAVE("SC107","数据保存出错！",false),
	//快递
	DATA_EXPRESS_ID_IS_NOT_NULL("EX100","快递ID不能为空!",false),
	//商品
	DATA_PRODUCT_ID_IS_NOT_NULL("PR100","商品ID不能为空！",false),
	DATA_FAVORITES_PRODUCT_IS_NOT_FIND("PR101","收藏夹里的商品没有找到！",false),
	DATA_PRODUCT_ADD_TO_FAVORITES_IS_SUCCESS("PR102","添加到收藏夹成功！！",true),
	DATA_PRODUCT_ADD_TO_FAVORITES_IS_ERROR("PR103","添加到收藏夹成功！！",false),
	DATA_PRODUCT_REMOVE_FROM_FAVORITES_IS_SUCCESS("PR104","移除收藏夹成功！！",true),
	DATA_PRODUCT_REMOVE_FROM_FAVORITES_IS_ERROR("PR105","移除收藏夹失败！！",false),
	DATA_PRODUCT_HAS_ADDED_FAVORITES("PR105","该商品已经收藏过！！",true),
	DATA_CONSULT_PARAM("SC109","咨询内容不能为空！",false),
	//用户数据
	/** 用户没有登录 */
	DATA_USER_LOGIN_NULL("SC200","用户登录名不能为空！",false),
	DATA_USER_LOGIN("SC201","用户没有登录！",false),
	DATA_USER_REGISTER_FAIL("SC202","用户注册失败！",false),
	DATA_USER_PWD_ERROR("SC203","密码错误！",false),
	DATA_USER_PWD_NULL("SC207","密码不能为空！",false),
	DATA_USER_EXIST("SC204","用户已存在！",false),
	DATA_USER_OLD_PWD_ERROR("SC205","原密码错误！",false),
	DATA_USER_NOT_REGISTER("SC206","用户未注册！",false),
	DATA_USER_EXIT_ERROR("SC208","安全退出异常！",false),
	
	//代理商提示
	DATA_AGENT_EXIST("SC207","正在审核！",false),
	
	//业务提示
	/** 图片被引用，无法删除！ */
	IMAGE_DATA_DELETE("SC301","图片被引用，无法删除！",false),
	/** 标签被引用，无法删除！ */
	TAG_DATA_DELETE("SC302","标签被引用，无法删除！",false),
	
	//文件
	DATA_FILE_ERROR("SC401","上传文件失败！",false),
	DATA_FILE_NOT_EXIST("SC402","没有上传文件！",false),
	DATA_FILE_fORMAT_ERROR("SC403","上传的文件格式错误！",false),

	//验证码
	DATA_CAPTCHA_ERROR("SC501","验证码错误！",false),
	DATA_CAPTCHA_OUTTIME("SC502","验证码过期！",false),
	DATA_CAPTCHA_NOT_EXIST("SC503","未发送验证码！",false),
	DATA_SEND_EXIST("SC504","短信发送失败！",false),
	
	//发货地址
	DATA_MEMBER_ADDRESS_NOT_NULL("SC604","收货地址不能为空！",false),
	
	//订单
	DATA_ORDER_CREATE_ERROR("SC705","订单创建失败！",false),
	DATA_ORDER_CREATE_SUCCESS("SC706","订单创建成功！",true),
	DATA_ORDER_FIND_ERROR("SC707","订单号错误，找不到该订单！",false),
	DATA_ORDER_DETAIL_CREATE_ERROR("SC708","订单详细生成失败！",false),
	DATA_ORDER_PAYMENT_CREATE_ERROR("SC709","订单支付生成失败！",false),
	DATA_ORDER_UPDATE_ERROR("SC710","订单状态修改失败！",false),
	DATA_ORDER_STOCK_UPDATE_ERROR("SC711","订单库存修改失败！",false),
	DATA_ORDER_TALLY_SUCCESS("SC712","订单结算成功！",true),
	
	
	//订单付款
	DATA_ORDER_ID_IS_NULL("OD100","订单号不能为空！",false),
	DATA_ORDER_AMOUNT_IS_NULL("OD101","订单金额不能为空！",false),
	DATA_ORDER_PAY_TYPE_IS_NULL("OD102","订单支付类型不能为空！",false),
	DATA_ORDER_BUYER_IP_IS_NULL("OD103","订单购买IP不能为空！",false),
	DATA_ORDER_PAY_REAL_NAME_IS_NULL("OD104","订单付款真实银行卡姓名不能为空！",false),
	DATA_ORDER_PAY_CARD_NUMBER_IS_NULL("OD105","银行卡号不能为空！",false),
	DATA_ORDER_PAY_ID_NUMBER_IS_NULL("OD106","开户银行卡身份证号不能为空！",false),
	DATA_ORDER_PAY_PHONE_IS_NULL("OD107","开户银行卡身份证号不能为空！",false),
	DATA_ORDER_PAY_CARD_ID_IS_NULL("OD108","银行卡ID不能为空！",false),
	DATA_ORDER_PRODUCT_NAME_IS_NULL("OD108","订单商品名称！",false),
	
	//微信支付订单
	DATA_WEIXIN_ORDER_CREATE_SUCCESS("SC801","微信app支付下单成功！",true),
	DATA_WEIXIN_ORDER_CREATE_ERROR("SC802","微信app支付下单失败！",false),
	DATA_WEIXIN_ORDER_SWEEP_SUCCESS("SC803","微信扫码支付下单成功！",true),
	DATA_WEIXIN_ORDER_SWEEP_ERROR("SC804","微信扫码支付下单获取失败！",false),
	DATA_ZFB_ORDER_SWEEP_SUCCESS("SC805","支付宝扫码支付下单成功！",true),
	DATA_ZFB_ORDER_SWEEP_ERROR("SC806","支付宝扫码支付下单成功失败！",false),
	
	//畅捷通快捷支付订单
	DATA_CHAN_QPAY_ORDER_CREATE_SUCCESS("QP100","银行鉴权成功！",true),
	DATA_CHAN_QPAY_ORDER_CREATE_ERROR("QP101","银行鉴权失败！",false),
	DATA_CHAN_QPAY_CONFIRM_REQUEST_ERROR("QP102","快捷支付交易确认接口请求失败！",false),
	DATA_CHAN_QPAY_CONFIRM_REQUEST_SUCCESS("QP103","畅捷通快捷支付交易确认接口请求成功！",true),
	DATA_CHAN_QPAY_VERIFICATION_CODE_IS_NULL("QP104","畅捷通快捷支付交易确认短信验证码不能为空！",false),
	DATA_CHAN_QPAY_MONEY_TO_BANK("QP105","银行已经受理",true),
	DATA_CHAN_QPAY_SUCCESS("QP106","支付成功",true),
	DATA_CHAN_QPAY_NOTPAY("QP107","支付未完成，尚未有支付信息",true),

	//银行卡相关信息
	DATA_BANK_CARD_BANK_NAME_ERROR("BK100","开户银行称不能为空！",false),
	DATA_BANK_CARD_ID_NUMBER_ERROR("BK101","银行卡身份证号码不能为空！",false),
	DATA_BANK_CARD_REAL_NAME_ERROR("BK102","银行卡开户姓名不能为空！",false),
	DATA_BANK_CARD_NUMBER_ERROR("BK103","银行卡卡号不能为空！",false),
	DATA_BANK_CARD_PHONE_NUMBER_ERROR("BK104","银行卡开户手机号不能为空！",false),
	DATA_BANK_CARD_ISBLANGTHEBANK_QUERY_FAIL("BK105","判断银行卡所属银行异常！",false),
	DATA_BANK_CARD_HAS_EXIST_SUCCESS("BK106","该银行卡已存在，请勿重复添加！",false),
	DATA_BANK_CARD_NUMBER_NOT_MATCH_SUCCESS("BK107","非开户银行卡号！",false),
	
	//促销模块
	DATA_PROMOTION_DETAIL_ID_IS_NOT_NULL_ERROR("PRO100","促销活动详情ID不能为空!",false),
	DATA_PROMOTION_DETAIL_IS_NOT_FIND_ERROR("PRO101","促销活动详情没有找到!",false);
	/** 异常代码 */
	public String code;
	/** 异常描述*/
	public String desc;
	/** 异常结果 */
	public Boolean success;
	
	ExceptionEnum(String code, String desc, Boolean success){
		this.code = code;
		this.desc = desc;
		this.success = success;
	}

	/**
	 * 获取异常代码
	 * @return String
	 */
	
	public String getCode() {
		return code;
	}

	/**
	 * 设置异常代码
	 * @param code
	 */
	
	public void setCode(String code) {
		this.code = code;
	}

	/**
	 * 获取异常描述
	 * @return String
	 */
	
	public String getDesc() {
		return desc;
	}

	/**
	 * 设置异常描述
	 * @param desc
	 */
	
	public void setDesc(String desc) {
		this.desc = desc;
	}

	/**
	 * 获取异常成功
	 * @return Boolean
	 */
	
	public Boolean getSuccess() {
		return success;
	}

	/**
	 * 设置异常成功
	 * @param success
	 */
	
	public void setSuccess(Boolean success) {
		this.success = success;
	}
}
